﻿///<reference path="../../jquery-1.4.4.min.js" />
///<reference path="kooboo.validators.js" />

kooboo.validators.addMethod("regex", function (value, params) {

    var pattern = params.pattern ? params.pattern : params;

    var regExp = new RegExp(pattern);

    return regExp.test(value);
});